{
  "properties" : { },
  "id" : "copy1733839993005d82720",
  "script" : null,
  "groupId" : "a01229049ea4496dab1bf8538af48dca",
  "name" : "查看对话状态",
  "createTime" : 1741019539062,
  "updateTime" : 1741367987155,
  "lock" : null,
  "createBy" : null,
  "updateBy" : null,
  "path" : "/arbitration_copy_copy",
  "method" : "GET",
  "parameters" : [ ],
  "options" : [ {
    "name" : "require_login",
    "value" : "false",
    "description" : "该接口需要登录才允许访问",
    "required" : false,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  } ],
  "requestBody" : "",
  "headers" : [ {
    "name" : "token",
    "value" : "aa2bbdb9-012a-43cf-86fb-1f0c0f830cab",
    "description" : null,
    "required" : false,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  } ],
  "paths" : [ ],
  "responseBody" : "{\n    \"code\": 200,\n    \"message\": \"success\",\n    \"data\": null,\n    \"timestamp\": 1733840567835,\n    \"executeTime\": 802\n}",
  "description" : null,
  "requestBodyDefinition" : null,
  "responseBodyDefinition" : null
}
================================
import response;
import log
import http


let chat_id = "7446785724646686770"
let conversation_id = "7446785724646670386"
let requestUrl = "https://api.coze.cn/v3/chat/message/list?" + "chat_id=" + chat_id + "&conversation_id=" + conversation_id
let appkey = "pat_xqSq4XAsAA5QzmBl5JL4teiyOVvCipC2HDWyXXkFMKoKmd6CZ3MaTkI1HV0CMSRM"

var result = http.connect(requestUrl).contentType('application/json').header("Authorization", "Bearer " + appkey).get().getBody()
log.info("result" + result)

db_res = db.table("orders").primary("id").update({
    id: order_re.id,
    ai_status: result.data.status, //更新状态
    conversation_id: result.data.conversation_id,
    chat_id: result.data.id,
})
